{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "feebd4e2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>no</th>\n",
       "      <th>name</th>\n",
       "      <th>totalprice</th>\n",
       "      <th>price</th>\n",
       "      <th>floor</th>\n",
       "      <th>level</th>\n",
       "      <th>size</th>\n",
       "      <th>year</th>\n",
       "      <th>line</th>\n",
       "      <th>walktime</th>\n",
       "      <th>...</th>\n",
       "      <th>l3wt</th>\n",
       "      <th>l12wt</th>\n",
       "      <th>l1wt</th>\n",
       "      <th>l10a</th>\n",
       "      <th>l15a</th>\n",
       "      <th>l9a</th>\n",
       "      <th>l4a</th>\n",
       "      <th>l3a</th>\n",
       "      <th>l12a</th>\n",
       "      <th>l1a</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>古北首席</td>\n",
       "      <td>570</td>\n",
       "      <td>116876</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>48.77</td>\n",
       "      <td>24</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>25</td>\n",
       "      <td>33</td>\n",
       "      <td>41</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>古北首席</td>\n",
       "      <td>530</td>\n",
       "      <td>108674</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>48.77</td>\n",
       "      <td>24</td>\n",
       "      <td>5</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>25</td>\n",
       "      <td>33</td>\n",
       "      <td>41</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>虹桥大仕馆</td>\n",
       "      <td>1600</td>\n",
       "      <td>107766</td>\n",
       "      <td>18</td>\n",
       "      <td>15</td>\n",
       "      <td>148.47</td>\n",
       "      <td>22</td>\n",
       "      <td>5</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>25</td>\n",
       "      <td>39</td>\n",
       "      <td>49</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>虹桥大仕馆</td>\n",
       "      <td>1530</td>\n",
       "      <td>103652</td>\n",
       "      <td>18</td>\n",
       "      <td>3</td>\n",
       "      <td>147.61</td>\n",
       "      <td>22</td>\n",
       "      <td>5</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>25</td>\n",
       "      <td>39</td>\n",
       "      <td>49</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>虹桥大仕馆</td>\n",
       "      <td>1550</td>\n",
       "      <td>104638</td>\n",
       "      <td>18</td>\n",
       "      <td>9</td>\n",
       "      <td>148.13</td>\n",
       "      <td>22</td>\n",
       "      <td>5</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>25</td>\n",
       "      <td>39</td>\n",
       "      <td>49</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>361</th>\n",
       "      <td>362</td>\n",
       "      <td>长春新苑</td>\n",
       "      <td>1090</td>\n",
       "      <td>111214</td>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>98.01</td>\n",
       "      <td>14</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>...</td>\n",
       "      <td>19</td>\n",
       "      <td>19</td>\n",
       "      <td>32</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>362</th>\n",
       "      <td>363</td>\n",
       "      <td>长春新苑</td>\n",
       "      <td>595</td>\n",
       "      <td>82285</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>72.31</td>\n",
       "      <td>27</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>...</td>\n",
       "      <td>19</td>\n",
       "      <td>19</td>\n",
       "      <td>32</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>363</th>\n",
       "      <td>364</td>\n",
       "      <td>领尚国际酒店公寓</td>\n",
       "      <td>276</td>\n",
       "      <td>55702</td>\n",
       "      <td>18</td>\n",
       "      <td>9</td>\n",
       "      <td>49.55</td>\n",
       "      <td>20</td>\n",
       "      <td>3</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>23</td>\n",
       "      <td>43</td>\n",
       "      <td>53</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>364</th>\n",
       "      <td>365</td>\n",
       "      <td>领尚国际酒店公寓</td>\n",
       "      <td>280</td>\n",
       "      <td>54055</td>\n",
       "      <td>18</td>\n",
       "      <td>15</td>\n",
       "      <td>51.80</td>\n",
       "      <td>20</td>\n",
       "      <td>3</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>23</td>\n",
       "      <td>43</td>\n",
       "      <td>53</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>365</th>\n",
       "      <td>366</td>\n",
       "      <td>领尚国际酒店公寓</td>\n",
       "      <td>500</td>\n",
       "      <td>57931</td>\n",
       "      <td>18</td>\n",
       "      <td>9</td>\n",
       "      <td>86.31</td>\n",
       "      <td>20</td>\n",
       "      <td>3</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>23</td>\n",
       "      <td>43</td>\n",
       "      <td>53</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>366 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      no      name  totalprice   price  floor  level    size  year  line  \\\n",
       "0      1      古北首席         570  116876      6      1   48.77    24     5   \n",
       "1      2      古北首席         530  108674      6      1   48.77    24     5   \n",
       "2      3     虹桥大仕馆        1600  107766     18     15  148.47    22     5   \n",
       "3      4     虹桥大仕馆        1530  103652     18      3  147.61    22     5   \n",
       "4      5     虹桥大仕馆        1550  104638     18      9  148.13    22     5   \n",
       "..   ...       ...         ...     ...    ...    ...     ...   ...   ...   \n",
       "361  362      长春新苑        1090  111214     17      3   98.01    14     5   \n",
       "362  363      长春新苑         595   82285      6      5   72.31    27     5   \n",
       "363  364  领尚国际酒店公寓         276   55702     18      9   49.55    20     3   \n",
       "364  365  领尚国际酒店公寓         280   54055     18     15   51.80    20     3   \n",
       "365  366  领尚国际酒店公寓         500   57931     18      9   86.31    20     3   \n",
       "\n",
       "     walktime  ...  l3wt  l12wt  l1wt  l10a  l15a  l9a  l4a  l3a  l12a  l1a  \n",
       "0           7  ...    25     33    41     1     1    1    1    1     0    0  \n",
       "1           7  ...    25     33    41     1     1    1    1    1     0    0  \n",
       "2          10  ...    25     39    49     1     1    1    1    1     0    0  \n",
       "3          10  ...    25     39    49     1     1    1    1    1     0    0  \n",
       "4          10  ...    25     39    49     1     1    1    1    1     0    0  \n",
       "..        ...  ...   ...    ...   ...   ...   ...  ...  ...  ...   ...  ...  \n",
       "361         6  ...    19     19    32     0     1    1    1    1     1    0  \n",
       "362         6  ...    19     19    32     0     1    1    1    1     1    0  \n",
       "363        10  ...    23     43    53     1     1    0    0    1     0    0  \n",
       "364        10  ...    23     43    53     1     1    0    0    1     0    0  \n",
       "365        10  ...    23     43    53     1     1    0    0    1     0    0  \n",
       "\n",
       "[366 rows x 24 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "house = pd.read_csv(\"house.csv\",encoding = \"gbk\")\n",
    "house"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "954e5dbc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(366, 24)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "house.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "ed3e5c40",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Predicted</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>516.821768</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Predicted\n",
       "0  516.821768"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 导入数据\n",
    "import pandas as pd\n",
    "house = pd.read_csv(\"house.csv\",encoding = \"gbk\")\n",
    "\n",
    "#建模\n",
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.model_selection import cross_val_score\n",
    "\n",
    "import numpy as np\n",
    "\n",
    "X = house[['floor','size','year','line']]\n",
    "y = np.array(house.totalprice)\n",
    "\n",
    "Xtrain,Xtest,ytrain,ytest=train_test_split(X,y,test_size=0.3,random_state=414)\n",
    "\n",
    "lr = LinearRegression()\n",
    "lr.fit(Xtrain,ytrain)#训练\n",
    "\n",
    "#预测\n",
    "x_s = {'floor':[8],'size':[66],'year':[23],'line':[4]}\n",
    "x_s = pd.DataFrame(x_s)\n",
    "\n",
    "pred=lr.predict(x_s)\n",
    "output = pd.DataFrame({'Predicted':pred})\n",
    "output\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "5beed1e5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>#sk-container-id-1 {color: black;}#sk-container-id-1 pre{padding: 0;}#sk-container-id-1 div.sk-toggleable {background-color: white;}#sk-container-id-1 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-container-id-1 label.sk-toggleable__label-arrow:before {content: \"▸\";float: left;margin-right: 0.25em;color: #696969;}#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-container-id-1 div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-container-id-1 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-container-id-1 div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: \"▾\";}#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}#sk-container-id-1 div.sk-estimator {font-family: monospace;background-color: #f0f8ff;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;}#sk-container-id-1 div.sk-estimator:hover {background-color: #d4ebff;}#sk-container-id-1 div.sk-parallel-item::after {content: \"\";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-1 div.sk-serial::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: 0;}#sk-container-id-1 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;position: relative;}#sk-container-id-1 div.sk-item {position: relative;z-index: 1;}#sk-container-id-1 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;position: relative;}#sk-container-id-1 div.sk-item::before, #sk-container-id-1 div.sk-parallel-item::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: -1;}#sk-container-id-1 div.sk-parallel-item {display: flex;flex-direction: column;z-index: 1;position: relative;background-color: white;}#sk-container-id-1 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-container-id-1 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-container-id-1 div.sk-parallel-item:only-child::after {width: 0;}#sk-container-id-1 div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: white;}#sk-container-id-1 div.sk-label label {font-family: monospace;font-weight: bold;display: inline-block;line-height: 1.2em;}#sk-container-id-1 div.sk-label-container {text-align: center;}#sk-container-id-1 div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }` but bootstrap.min.css set `[hidden] { display: none !important; }` so we also need the `!important` here to be able to override the default hidden behavior on the sphinx rendered scikit-learn.org. See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;}#sk-container-id-1 div.sk-text-repr-fallback {display: none;}</style><div id=\"sk-container-id-1\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>LinearRegression()</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-1\" type=\"checkbox\" checked><label for=\"sk-estimator-id-1\" class=\"sk-toggleable__label sk-toggleable__label-arrow\">LinearRegression</label><div class=\"sk-toggleable__content\"><pre>LinearRegression()</pre></div></div></div></div></div>"
      ],
      "text/plain": [
       "LinearRegression()"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "house = pd.read_csv(\"house.csv\",encoding = \"gbk\")\n",
    "\n",
    "#统一量纲 总价单位：千万\n",
    "import numpy as np\n",
    "X = house[['floor','size','year','line']]\n",
    "y = np.array(house.totalprice/1000)\n",
    "\n",
    "#重设模型\n",
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "Xtrain,Xtest,ytrain,ytest=train_test_split(X,y,test_size=0.3,random_state=414)\n",
    "lr = LinearRegression()\n",
    "lr.fit(Xtrain,ytrain)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "531d3ee5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.06458335233726137"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# MSE均方误差评估\n",
    "from sklearn.metrics import mean_squared_error\n",
    "y_pred = lr.predict(Xtrain)\n",
    "MSE_train_1=mean_squared_error(ytrain,y_pred)\n",
    "MSE_train_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "420da046",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.04468098722468692"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_test_pred=lr.predict(Xtest)\n",
    "MSE_test_1=mean_squared_error(ytest,y_test_pred)\n",
    "MSE_test_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "baf2bef6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.07362358806926575"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#交叉验证-MSE\n",
    "from sklearn.model_selection import cross_val_score\n",
    "lr2 = LinearRegression()\n",
    "MSE_cvs_1=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_squared_error').mean()\n",
    "MSE_cvs_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "ff5e312d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.18056662191789663"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 交叉验证-MAE\n",
    "from sklearn.metrics import mean_absolute_error\n",
    "MAE_1=mean_absolute_error(ytrain,y_pred)\n",
    "MAE_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "0cdbf444",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-0.1867962338377509"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "MAE_cvs_1=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_absolute_error').mean()\n",
    "MAE_cvs_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "bcc4aa18",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.887783053015303"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#交叉验证-方差\n",
    "from sklearn.metrics import r2_score\n",
    "r2_train_1=r2_score(ytrain,y_pred)\n",
    "r2_train_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "236a1b78",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.839805637954528"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r2_test_1=r2_score(ytest,y_test_pred)\n",
    "r2_test_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "3bcf52e2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.887783053015303"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Score_train_1=lr.score(Xtrain,ytrain)\n",
    "Score_train_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "d706f0dd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.839805637954528"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Score_test_1=lr.score(Xtest,ytest)\n",
    "Score_test_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "b71f1dfc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkkAAAGsCAYAAADJ4TOYAA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FtnHmuorRaFJBER8R7qSWp9+/bBwYPmZrbXX291NV5FIUlERLyHVt1ufa6htu99D6Kjra3Fy/hESFq2bBk2m63ObdmyZQBMnz691vn0GpPOcnNzycjIID4+npkzZ2IYRpPaRETEAq6J2ydPmjfxPF363yCfCEmTJk2iuLjYfTty5Ajt27cnKysLgB07drB27Vp3+86dOwFwOp2MHj2aAQMGkJOTQ15enjtYNdYmIiIWiYqCrl3N4z17rK0lEJSXm1e2gUJSPXwiJIWGhhIXF+e+LV++nHHjxpGamkplZSW5ublkZWW522NiYgBYt24ddrudBQsWkJaWxpw5c1i6dOkF20RExEKal9R6tm6FsjK47DK44gqrq/E6PhGSaiovL+fZZ59l1qxZAOzevRvDMOjfvz8RERGMHDmSw4cPA7Br1y4yMzOJjIwEoF+/fuTl5V2wrT5OpxOHw1HrJiIiHqCQ1Hp06X+jvCokjRkzplaPkeu2cOFC93NeeOEFMjMz6d69OwD5+fn07duXF198kby8PNq0acM999wDgMPhICUlxf1am81GcHAwxcXFjbbVZ+7cucTGxrpvycnJHvgOiIiIQlIr0nykRoVYXUBNixcvpqysrM75hIQE9/GiRYt4/PHH3Y8nT57M5MmT3Y8XLlxIamoqDoeDkJAQwsLCar1XeHg4paWljbbFx8fXqWHWrFnMmDHD/djhcCgoiYh4gkJS6zh8GPLyICgIhg+3uhqv5FUhqWPHjo2279u3j3379jG8kR9mXFwc1dXVHD9+nISEBHJzc2u1l5SUEBoa2mhbfcLCwuqEKhER8QBXSDpwwNzHTf/2esabb5r3mZlQT+eANHO4raKigjlz5jBw4ECSkpL4/PPPueaaa9i/f39L11fLypUryc7Opk2bNu5zM2bMYOXKle7HH3/8MUFBQSQnJ5ORkcH27dvdbQUFBTidThISEhptExERC3XqBG3bQnW1udCheIaG2i6oWSHpvvvu4//+7/+48847KSkpITIykszMTPdcIE9Zv349139rNdD+/fsze/ZstmzZwqZNm5g+fTpTp04lMjKSrKws7HY7y5cvB2DevHkMHz6c4ODgRttERMRCNpu2J/G0igp4+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W0RdfNH1j2rIyWLXKPJ440XP1idfwyp4kwzDcayS5zJ07l+LiYg4fPsyzzz5LVFSUu23MmDHs3buXJUuWuK+Eu9S2QHXHHXewdOlSAD788EPeffdd9821gCfAmjVrGDJkCACfffYZJ0+erPf97r33XubOncvy5cv54x//WKvt9OnTPPnkk+7AMXfuXH784x+729evX09aWlq9i4ueOnWKM2fOUF5e3uCtsrKywa8zNTWVNWvWAPDEE08wbdq0Bp9bUVFBr169WLdunfvcRx99RHR0NHa7neeee67WGloi4gOaM3l77VooKYFu3WDQIM/UJV7FJ3qSmiIpKYmkpKQWbQtEd9xxBz/60Y8IDg7md7/7HVdddRWRkZEcP36c0tJSXn75Zfbv31/rar8XX3yRN998ky1bttQKrwBt2rTB6XQyZMgQrrnmGnr06EF2djZgho/Vq1ezdetWXnvtNcaPH89TTz3FmjVruOWWW3j66aeZMmVKncAM0LVrV/ck6Pp6s86ePcucOXOYOXNmvV9nZGQksbGxgDmpurHJ1C+88AJpaWmMHDnSfS4xMZHY2FhiY2PZtGkTe/fu5emnn278mysi3qM5Icm1NtLEieamtuL3/CYkScsYMmQIu3btom3btjzzzDPMnTuXkpISvvrqK+bOncuuXbt48skneeihh9yveeqpp9i3bx/r169n5MiRhIeHu4OLazgqNTWV1157jcsvv9z9usTERN544w2ee+45QkJCSEtL44033iAzM5PXX3+dwsLCWr03NZ29wHYCw4cPr7WUw86dO2v1Uu3bt49p06YRFRXF119/zblz57jiiivc7WvWrCEtLc0dtl599VVeffVVcnNzmT17Nm3atHHv9ffkk0+yfft2/va3v3HHHXc09VstIla62JB0+rTZkwQaagsgCkmtxTCgtNSaz46MhCbMC3I6nSxbtoy7777bPY+ourqaK6+8kpdffhmA4ODgOj03NpuNFStWYBgGSUlJREREuJ9z+vRpKisr+de//kV1dTWjR4/m2WefZc+ePfTu3du9jtS3h+JcunTpwpkzZ3jkkUf47//+b/f5c+fOMWTIEMaNG8evfvWrOmtYOZ3OWr1a1dXVfP755+5gc8UVV7Bw4UKG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9ezZRUVEEBQVx6623Mn/+fO67776mfItFxBv07g0bNlx4exLXApLqRQo4CklSy9dff82qVavYvXs3d955J0uWLGHAgAH06tWL9evXs23bNs6dO1fva0+cOMEf/vCHWpOwbTYbQ4YMYdOmTVx++eVUVlYSEhLCW2+9xU033URQUFCtoT1XAKu5MXB1dTVTpkypNa/pwIEDrFq1ipdeeomioiKmTp3K9u3bSUlJAerOSWquoUOHkp6eTnp6OklJSXTp0sXdWzRy5EgmTZrE73//e5YuXcpE/QMq4luaMnn7wAHYvt285H/8+NapS7yG5iRJLX/4wx+47bbbSEtLo127dvztb3/jiiuu4Morr6SwsJDBgwfXmf8DZpAZNWoUISEh7Nu3D8MwmDx5Mn//+9+54447+Pvf/05JSQkjR46ktLSUG2+8kYqKCqqqqqisrHTffv3rXzNjxoxa56qrq90LXALs3buX3r178+9//5sHH3yQgwcP8sQTT7gDEtBgT9LFGjBgAP379+fo0aP86U9/YtSoUe62HTt2cPToUcaNG8fEiRMpKirSopIivsTVu91YSFqxwry/4QbQRRkBRz1J4rZr1y6effZZduzYAZjr/yQnJ/OLX/yCb775hgkTJvDhhx/SrVu3WqtvHz58mGPHjvGHP/yByspKBg0axF133cWNN97IsGHDiImJ4YEHHuBnP/sZH3/8MeHh4QQFBbm3H6mpoVWya16d1qNHD/bv30+ya9Llf+zfvx+n08mHH36Iw+GodZWZ632bOifJMAwMw+Dmm2/myJEj3HTTTVx33XXcf//97Nixg4cffpjTp0+zfv16Jk+ezLBhw9iyZQulpaXu/QBFxMu5epIOHDAv7//WUiLA+aG2SZNary7xHoY0i91uNwDDbrfXaSsrKzPy8vKMsrIyCyprvi+//NJ44IEHDMMwjM2bNxtRUVHG7t27DcMwjHPnzhljxowxDh06ZDz33HNGRESE8Ytf/ML92rffftswDMNwOp1GRUVFnffeunWrERMTY9x///31fvZbb71lDBs2zIiNjTV+//vfN6v+P/7xj0ZoaKjRs2dP46mnnqrz+U35dS8uLjYAIy8vzzAMo87P9/333zeioqKMxx57zHA6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7V/bigoACn0+nuhW0NCknS4t58803y8/PJz8/nueeec58/ePAg3bt3t66wANWlS5daj6Ojo2nfvj3t27e3qKLAlpCQwPr163nggQeYMWMGnTp1YsWKFfpvwyI/+tGP2LNnD8888wzHjx/niiuu4JVXXtEUAS+QlZWF3W5n+fLlTJkyhXnz5jF8+HCCg4NbrQZtcCsiIiJewWaz1fof6tWrVzNp0iRiYmKoqqpi8+bN9O3bt/XqUUgSERERb1VYWEhOTg6DBw8mMTGxVT9bIUlERESkHloCQERERKQeCkkiIiIi9VBIEhEREamHQpKIiIhIPRSSREREROqhkCQifqmgoEArvIvIJVFIEhEREamHQpKIiIhIPRSSRMRvvP7666Snp9OuXTuWLVvmPv/xxx8zcOBAYmNjGTduHHa73d22adMmUlJSSEpK4te//jXJycm8+uqrAHTv3p23336bRx55hE6dOrFr1y7365YvX06PHj1o3749jzzyCK51eQ3D4Pe//z3dunWjc+fOPPvss63zxYtIyzNERPxAUVGRERkZaSxZssTYu3evkZGRYQBGcXGx0a5dO+Pxxx83Dh06ZIwYMcK48847DcMwjOrqauOyyy4z/vnPfxrvvPOOERUVZXz55ZeGw+EwDMMwunXrZmRmZhq33367sWnTJqOkpMQwDMPYsmWLERoaarz++uvGZ599ZnTp0sX45z//aRiGYSxfvtyIj483PvjgA+ODDz4woqOjja1bt1rzTRGRS6JtSUTEL/zjH/9g/vz5fPbZZwCsW7eOH/zgB/zzn/9k5syZHDt2DJvNxptvvsmPf/xjvv76a77++ms6duyI0+kkNDSUzp0788orrzBo0CDA7Enq3bs369evr/VZd911F2fOnGHFihUAzJo1i/3797Ny5UqGDx/Od7/7XebNmwfAxIkTSU5O5umnn27F74aItIQQqwsQEWkJx48fJzk52f04NTUVMDfHPHHiBPHx8QBUV1dTUlJCeXk57dq1Iy4ujm3bttGlSxfsdjvp6em13nf69Ol1PquwsJB33nmHuLg4AM6dO0e/fv3cbR988AGLFi0CoLy8nDFjxrT0lysirUAhSUT8QocOHTh27Jj78eHDhwHo0qUL3/3ud929PoZhYLfbadOmDdXV1QwYMIAf/OAHVFZWMm/evDq7jEdFRdX5rC5dunDvvffyy1/+EoCKigqqq6vdbXfeeSe33XYbgLuXSkR8jyZui4hfGDFiBHv27OEf//gH+/fv57e//S0Ao0aN4tChQ3z00UcEBwezYsUKRo4ciWEYbN26lW+++YacnBwOHz7Mr371qyZ91pQpU1izZg1FRUVUVlYye/ZsZs+eDcDtt9/Oiy++SElJCaWlpdx999386U9/8tSXLSIepJAkIn4hKSmJF154gccff5whQ4Zw7bXXAhAXF8err77KH/7wB3r37s2qVat49dVXCQkJ4ZprruHEiRMMGTKEzp0707ZtW5544okLftb3vvc9fvvb3/LjH/+Yq666inPnzvHnP/8ZgMmTJ/OjH/2IUaNGMXjwYFJSUpr0niLifTRxW0QC1m9+8xuOHj3KU089RWhoKBs2bODnP/85p06dsro0EfECmpMkIgFrzJgx/OxnP6Nnz55UVlbSs2dP94RrERH1JImIiIjUQ3OSREREROqhkCQiIiJSD4UkERERkXooJImIiIjUQyFJREREpB4KSSIiIiL1UEgSERERqYdCkoiIiEg9/j9UhlFtKed+vAAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 学习曲线\n",
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "plt.rcParams['axes.unicode_minus'] = False\n",
    "plt.rcParams['font.sans-serif'] = ['Simhei']\n",
    "\n",
    "res_test = []\n",
    "res_train = []\n",
    "\n",
    "for i in range(10):\n",
    "    poly = PolynomialFeatures(degree=i+1).fit(Xtrain,ytrain)\n",
    "    X_train = poly.transform(Xtrain)\n",
    "    X_test = poly.transform(Xtest)\n",
    "    lr1 = LinearRegression().fit(X_train,ytrain)\n",
    "    res_score = lr1.score(X_test,ytest)\n",
    "    res = lr1.score(X_train,ytrain)\n",
    "    res_test.append(res_score)\n",
    "    res_train.append(res)\n",
    "    \n",
    "plt.plot(range(1,11),res_test,color=\"red\",label=\"测试学习曲线\")\n",
    "plt.plot(range(1,11),res_train,color=\"blue\",label=\"训练学习曲线\")\n",
    "plt.ylabel(\"socre\")\n",
    "plt.xlabel(\"degree\")\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "04d48bbe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>多项式次数</th>\n",
       "      <th>测试集分数</th>\n",
       "      <th>训练集分数</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0.839806</td>\n",
       "      <td>0.887783</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>0.941406</td>\n",
       "      <td>0.981317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>0.934537</td>\n",
       "      <td>0.986002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>0.805949</td>\n",
       "      <td>0.990188</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>-0.010103</td>\n",
       "      <td>0.993658</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>-368.832457</td>\n",
       "      <td>0.998946</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>-798.114318</td>\n",
       "      <td>0.999179</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>8</td>\n",
       "      <td>-16678.592285</td>\n",
       "      <td>0.999174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>9</td>\n",
       "      <td>-9572.879147</td>\n",
       "      <td>0.999115</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10</td>\n",
       "      <td>-737.194364</td>\n",
       "      <td>0.998774</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   多项式次数         测试集分数     训练集分数\n",
       "0      1      0.839806  0.887783\n",
       "1      2      0.941406  0.981317\n",
       "2      3      0.934537  0.986002\n",
       "3      4      0.805949  0.990188\n",
       "4      5     -0.010103  0.993658\n",
       "5      6   -368.832457  0.998946\n",
       "6      7   -798.114318  0.999179\n",
       "7      8 -16678.592285  0.999174\n",
       "8      9  -9572.879147  0.999115\n",
       "9     10   -737.194364  0.998774"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "Res_match = pd.DataFrame({'多项式次数':range(1,1),'测试集分数':res_test,'训练集分数':res_train})\n",
    "Res_match"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "a7192744",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiIAAAGbCAYAAAD5mfsKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA75El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AA0xBETLBt2zZZLBZZLBbl5+fri1/8orZs2ZLUP3/cuHEx7wMAwGwEEZMUFxerpaVFTqdT//zP/6xFixbpxIkTKXu96dOnq6GhIeHnjRs3Ttu2bUv+gAAAEEHENBaLRSUlJRozZox+8IMfaNy4cdq+fXvKXs9ms0XtbAcAgBkIImnCZrOps7NT3/3ud3X33Xfrd7/7nS666CI98sgjgcfs2rVLU6dOld1u18KFC+V2uwM/85/eO3bsWL3yyithf35vSzOvv/66ampqNGzYMF1zzTU6fvy4JGnOnDmyWCw6evSoZs6cKYvFogcffDD5bxwAkNMIIn4mnkD42muv6eDBg7r88sslSVu2bNHatWu1Zs0aXXfddZKkM2fO6JprrtHcuXP1/vvvq62tTXfccYckae/evbr99tv1i1/8Qlu2bNGzzz4b1+seOXJECxYs0L/8y7/owIEDKikp0e233y5J+uMf/6iWlhaVl5frxRdfVEtLi5YvX578Nw8AyGl0VpU+O4HQ32//qadS3urW7XarpKRE58+f16BBg7R27Vp9/vOflyQdOnRIH374oex2e+DxL730kvLz87Vy5UpZLBYtX75c3/nOdyRJzz33nK6++mpde+21kqQ777xTP/vZz2KO4emnn9YVV1yh7373u5Kkhx56SHv27JEkDRkyRJKUl5enoUOHqqSkJEnvHACAzxBEJF+f/bo63wmEdXW+2ylueTts2DDt2bNH+fn5Gjt2rCwWS+BnN910U1AI8Q3RpaamJg0fPlyS1N3drdbWVp0/f14nT55UeXl54LFVVVVxjeH48eNByzVlZWUqKyvrx7sCACAxLM1In51AWFIyYCcQ5uXlady4cXI4HEEhRPpsNqKnsrIyfe1rX9OePXu0Z88e7d27V++9957y8/M1atSooB03TqczrjGUl5fr8OHDgdsffvihvvKVr6i7uztonIZhJPr2AADpyMQyhN4QRKTPTiDctm1AlmX6Yu7cuTp69KjeeecdWa1WPfPMM5ozZ44Mw9C1116rLVu26E9/+pM++OADPfTQQ3H9mTfccIPefPNNPfnkkzp27Jjuu+8+jRo1Snl5n/1aVFdX65VXXtHJkyf1+uuvp+rtAQBSz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nXfG7IOPzzz//POqqqqSzWbT1KlTdeDAAUlc0/6aM2eOnnzySUlcy/748Y9/rPnz5wducy0T89vf/lYVFRUaOnSorrrqKh05ckQS1zERp0+fVmVlZeDaSdGvH9c2B4NIe3u75s+fr8mTJ2v37t3av39/4AMA0X300Ue65ZZb9OCDD8rlcunCCy/U97//fa5pP23YsEFbtmyRxO9nf+zbt09r167Vww8/LIlrmaiPPvpI//7v/67nnntO+/fv14UXXqjvfve7XMcEnDp1SvPmzQsKIdGuH9f2U0aO2bRpkzF8+HDjk08+MQzDMPbs2WNcfvnlJo8qM7z44ovGunXrArffeOMNo6CggGvaD6dPnzYuuOAC46KLLjKeeOIJrmUfdXd3G7W1tcbKlSsD93EtE/Pf//3fxre+9a3A7TfffNMYM2YM1zEBX//6142HH37YkGQcPnzYMIzov4dcW5+cmxHZu3evpk2bpqKiIklSTU2N9u/fb/KoMsO8efP0D//wD4HbBw8eVHV1Nde0H+644w79/d//vaZNmyaJ38+++tWvfqU9e/aosrJSL730kjo7O7mWCZo4caLeeOMNvffee3K73frFL36hq6++muuYgPXr1+uHP/xh0H3Rrh/X1ifngojH41FlZWXgtsVikdVqVUtLi4mjyjwdHR1atWqVli1bxjXto61bt+r111/Xz372s8B9XMvEnT17VnfddZfGjx+v48ePa82aNbriiiu4lgmaOHGiFi1apK9+9asqKSnRzp07tWrVKq5jAqqqqsLui3b9uLY+ORdEbDZbWHvdQYMGqa2tzaQRZaa77rpLQ4cO1a233so17YPz58/rtttu07p164JO4eRaJm7jxo365JNP9MYbb2jlypV69dVXdebMGT3++ONcywTU19frxRdf1M6dO9Xa2qobbrhB3/jGN/id7Kdo149r65NzQaS0tFRNTU1B97W2tqqgoMCkEWWe1157TY8++qiefvpp5efnc0374N5779WUKVM0d+7coPu5lok7fvy4pk6dqtLSUkm+//HX1NTo/PnzXMsE/Nd//ZeWLFmiSy+9VEOHDtV9992nQ4cO8TvZT9GuH9fWx2b2AAbalClT9NhjjwVuHzlyRO3t7YH/iSG6Q4cO6dvf/rbWrVuniRMnSuKa9sXTTz+tpqYmlZSUSJLa2tr07LPPaty4cers7Aw8jmsZW3l5uc6dOxd039GjR7V69Wr953/+Z+A+rmV0XV1dQUsCra2t+uSTT2Sz2VRfXx+4n+uYmGj/f+T/nZ8yu1p2oHV2dhojR440nnrqKcMwDOO2224z5s2bZ/KoMkNbW5sxYcIE4wc/+IHR2toa+Oro6OCaJujYsWPG4cOHA1/f/OY3jYceeshoamriWibo9OnTht1uN9atW2ccO3bM+PnPf24UFhYa//u//8u1TMDvf/97Y/DgwcaaNWuMDRs2GDNnzjQqKir477sP1GPXTLTPHD6PfHIuiBiGb8vU4MGDjVGjRhmf+9znjH379pk9pIywadMmQ1LY1+HDh7mm/XTzzTcbTzzxhGEY/H72xdtvv23U1tYagwcPNiorK41NmzYZhsG1TER3d7dx9913GxUVFUZ+fr7xla98xdi9e7dhGFzHRPUMIoYR/fpxbQ3DYhg52MZNksvl0u7du1VbW6uRI0eaPZyswDVNHq5l8nAtk4Pr2D/Rrl+uX9ucDSIAAMB8ObdrBgAApA+CCAAAMA1BBAAAmIYgAgAATEMQAQAApiGIAAAA0xBEAACAaQgiAADANAQRAABgmv8fkiEprMCkv50AAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#重设模型\n",
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "\n",
    "Xtrain,Xtest,ytrain,ytest=train_test_split(X,y,test_size=0.3,random_state=414)\n",
    "poly = PolynomialFeatures(degree=2).fit(Xtrain,ytrain)\n",
    "X_train = poly.transform(Xtrain)\n",
    "X_test = poly.transform(Xtest)\n",
    "lr1 = LinearRegression().fit(X_train,ytrain)\n",
    "\n",
    "y_test_pred=lr1.predict(X_test)\n",
    "    \n",
    "#拟合程度可视化\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "plt.scatter(range(len(ytest)),sorted(ytest),s=2,label='Reality')\n",
    "plt.scatter(range(len(ytest)),y_test_pred[np.argsort(ytest)],s=2,c='r',label='Predict',alpha=0.8)\n",
    "\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "c27a0671",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Predicted</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>476.636158</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    Predicted\n",
       "0  476.636158"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#优化预测\n",
    "x_s = {'floor':[8],'size':[66],'year':[23],'line':[4]}\n",
    "x_s = pd.DataFrame(x_s)\n",
    "\n",
    "X_s = poly.transform(x_s)\n",
    "\n",
    "pred=lr1.predict(X_s)*1000 #恢复量纲，总价单位：万\n",
    "output = pd.DataFrame({'Predicted':pred})\n",
    "output"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "b4f6b6e4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>评估项目</th>\n",
       "      <th>优化前</th>\n",
       "      <th>优化后</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>MSE_train</td>\n",
       "      <td>0.064583</td>\n",
       "      <td>0.010753</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>MSE_test</td>\n",
       "      <td>0.044681</td>\n",
       "      <td>0.016343</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>MSE_cvs</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>MAE</td>\n",
       "      <td>0.180567</td>\n",
       "      <td>0.073262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>MAE_cvs</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>r2_train</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>r2_test</td>\n",
       "      <td>0.839806</td>\n",
       "      <td>0.941406</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Score_train</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Score_test</td>\n",
       "      <td>0.839806</td>\n",
       "      <td>0.941406</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          评估项目       优化前       优化后\n",
       "0    MSE_train  0.064583  0.010753\n",
       "1     MSE_test  0.044681  0.016343\n",
       "2      MSE_cvs -0.073624 -0.073624\n",
       "3          MAE  0.180567  0.073262\n",
       "4      MAE_cvs -0.186796 -0.186796\n",
       "5     r2_train  0.887783  0.981317\n",
       "6      r2_test  0.839806  0.941406\n",
       "7  Score_train  0.887783  0.981317\n",
       "8   Score_test  0.839806  0.941406"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# MSE均方误差评估\n",
    "from sklearn.metrics import mean_squared_error\n",
    "y_pred = lr1.predict(X_train)\n",
    "MSE_train_2=mean_squared_error(ytrain,y_pred)\n",
    "\n",
    "y_test_pred=lr1.predict(X_test)\n",
    "MSE_test_2=mean_squared_error(ytest,y_test_pred)\n",
    "\n",
    "#交叉验证-MSE\n",
    "from sklearn.model_selection import cross_val_score\n",
    "lr2 = LinearRegression()\n",
    "MSE_cvs_2=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_squared_error').mean()\n",
    "\n",
    "# 交叉验证-MAE\n",
    "from sklearn.metrics import mean_absolute_error\n",
    "MAE_2=mean_absolute_error(ytrain,y_pred)\n",
    "\n",
    "MAE_cvs_2=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_absolute_error').mean()\n",
    "\n",
    "#交叉验证-方差\n",
    "from sklearn.metrics import r2_score\n",
    "r2_train_2=r2_score(ytrain,y_pred)\n",
    "\n",
    "r2_test_2=r2_score(ytest,y_test_pred)\n",
    "\n",
    "Score_train_2=lr1.score(X_train,ytrain)\n",
    "\n",
    "Score_test_2=lr1.score(X_test,ytest)\n",
    "\n",
    "import pandas as pd\n",
    "output = pd.DataFrame({'评估项目':['MSE_train','MSE_test','MSE_cvs','MAE','MAE_cvs','r2_train','r2_test','Score_train','Score_test'],\n",
    "                       '优化前':[MSE_train_1,MSE_test_1,MSE_cvs_1,MAE_1,MAE_cvs_1,r2_train_1,r2_test_1,Score_train_1,Score_test_1],\n",
    "                       '优化后':[MSE_train_2,MSE_test_2,MSE_cvs_2,MAE_2,MAE_cvs_2,r2_train_2,r2_test_2,Score_train_2,Score_test_2]\n",
    "                      })\n",
    "output"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "5503aec6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>评估项目</th>\n",
       "      <th>优化前</th>\n",
       "      <th>多线性优化后</th>\n",
       "      <th>归一化后</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>MSE_train</td>\n",
       "      <td>0.064583</td>\n",
       "      <td>0.010753</td>\n",
       "      <td>0.064583</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>MSE_test</td>\n",
       "      <td>0.044681</td>\n",
       "      <td>0.016343</td>\n",
       "      <td>0.108287</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>MSE_cvs</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>MAE</td>\n",
       "      <td>0.180567</td>\n",
       "      <td>0.073262</td>\n",
       "      <td>0.180567</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>MAE_cvs</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>r2_train</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "      <td>0.887783</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>r2_test</td>\n",
       "      <td>0.839806</td>\n",
       "      <td>0.941406</td>\n",
       "      <td>0.611759</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Score_train</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "      <td>0.887783</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Score_test</td>\n",
       "      <td>0.839806</td>\n",
       "      <td>0.941406</td>\n",
       "      <td>0.611759</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          评估项目       优化前    多线性优化后      归一化后\n",
       "0    MSE_train  0.064583  0.010753  0.064583\n",
       "1     MSE_test  0.044681  0.016343  0.108287\n",
       "2      MSE_cvs -0.073624 -0.073624 -0.073624\n",
       "3          MAE  0.180567  0.073262  0.180567\n",
       "4      MAE_cvs -0.186796 -0.186796 -0.186796\n",
       "5     r2_train  0.887783  0.981317  0.887783\n",
       "6      r2_test  0.839806  0.941406  0.611759\n",
       "7  Score_train  0.887783  0.981317  0.887783\n",
       "8   Score_test  0.839806  0.941406  0.611759"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 归一化\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "std = StandardScaler()\n",
    "X_train = std.fit_transform(Xtrain)\n",
    "X_test = std.fit_transform(Xtest)\n",
    "lr3 = LinearRegression().fit(X_train,ytrain)\n",
    "\n",
    "y_test_pred=lr3.predict(X_test)\n",
    "\n",
    "# MSE均方误差评估\n",
    "from sklearn.metrics import mean_squared_error\n",
    "y_pred = lr3.predict(X_train)\n",
    "MSE_train_3=mean_squared_error(ytrain,y_pred)\n",
    "\n",
    "y_test_pred=lr3.predict(X_test)\n",
    "MSE_test_3=mean_squared_error(ytest,y_test_pred)\n",
    "\n",
    "#交叉验证-MSE\n",
    "from sklearn.model_selection import cross_val_score\n",
    "lr2 = LinearRegression()\n",
    "MSE_cvs_3=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_squared_error').mean()\n",
    "\n",
    "# 交叉验证-MAE\n",
    "from sklearn.metrics import mean_absolute_error\n",
    "MAE_3=mean_absolute_error(ytrain,y_pred)\n",
    "\n",
    "MAE_cvs_3=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_absolute_error').mean()\n",
    "\n",
    "#交叉验证-方差\n",
    "from sklearn.metrics import r2_score\n",
    "r2_train_3=r2_score(ytrain,y_pred)\n",
    "\n",
    "r2_test_3=r2_score(ytest,y_test_pred)\n",
    "\n",
    "Score_train_3=lr3.score(X_train,ytrain)\n",
    "\n",
    "Score_test_3=lr3.score(X_test,ytest)\n",
    "\n",
    "import pandas as pd\n",
    "output = pd.DataFrame({'评估项目':['MSE_train','MSE_test','MSE_cvs','MAE','MAE_cvs','r2_train','r2_test','Score_train','Score_test'],\n",
    "                       '优化前':[MSE_train_1,MSE_test_1,MSE_cvs_1,MAE_1,MAE_cvs_1,r2_train_1,r2_test_1,Score_train_1,Score_test_1],\n",
    "                       '多线性优化后':[MSE_train_2,MSE_test_2,MSE_cvs_2,MAE_2,MAE_cvs_2,r2_train_2,r2_test_2,Score_train_2,Score_test_2],\n",
    "                       '归一化后':[MSE_train_3,MSE_test_3,MSE_cvs_3,MAE_3,MAE_cvs_3,r2_train_3,r2_test_3,Score_train_3,Score_test_3]\n",
    "                      })\n",
    "output"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "03e7d488",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "house = pd.read_csv(\"house.csv\",encoding = \"gbk\")\n",
    "\n",
    "#统一量纲 总价单位：千万\n",
    "import numpy as np\n",
    "X = house[['floor','size','year','line']]\n",
    "y = np.array(house.totalprice/1000)\n",
    "\n",
    "#重设模型\n",
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "Xtrain,Xtest,ytrain,ytest=train_test_split(X,y,test_size=0.3,random_state=414)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "7cb2004c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([3.4  , 0.84 , 0.74 , 0.446, 0.735, 0.409, 0.53 , 0.56 , 0.276,\n",
       "       0.43 , 0.67 , 0.828, 0.75 , 1.295, 0.68 , 0.385, 0.42 , 0.425,\n",
       "       0.82 , 1.38 , 0.65 , 0.73 , 0.448, 0.71 , 1.3  , 0.65 , 0.418,\n",
       "       0.73 , 0.48 , 4.66 , 0.312, 0.52 , 0.76 , 0.548, 0.85 , 0.95 ,\n",
       "       1.65 , 1.599, 2.05 , 0.57 , 1.845, 0.66 , 0.478, 0.395, 0.27 ,\n",
       "       0.66 , 0.575, 0.838, 0.37 , 0.64 , 1.02 , 0.47 , 1.82 , 0.395,\n",
       "       0.95 , 1.28 , 2.55 , 0.946, 1.42 , 0.588, 0.37 , 0.879, 0.487,\n",
       "       0.437, 0.45 , 0.267, 0.379, 1.279, 3.018, 0.238, 0.63 , 0.283,\n",
       "       0.619, 0.674, 0.39 , 0.46 , 0.489, 1.35 , 0.299, 0.449, 1.65 ,\n",
       "       0.475, 1.1  , 0.409, 0.527, 0.648, 1.09 , 0.7  , 0.85 , 0.29 ,\n",
       "       0.293, 0.58 , 0.299, 0.295, 0.72 , 0.419, 0.465, 0.425, 0.349,\n",
       "       0.405, 0.26 , 0.86 , 1.698, 1.72 , 0.258, 1.288, 0.275, 1.15 ,\n",
       "       0.595, 0.48 , 0.305, 0.258, 0.385, 1.16 , 0.41 , 1.25 , 0.55 ,\n",
       "       0.385, 1.7  , 0.398, 0.85 , 2.5  , 0.398, 1.33 , 0.72 , 0.36 ,\n",
       "       2.5  , 0.35 , 0.288, 0.428, 0.6  , 0.836, 0.68 , 2.2  , 0.878,\n",
       "       0.29 , 0.53 , 0.488, 0.649, 1.2  , 2.575, 0.359, 1.699, 0.793,\n",
       "       0.27 , 0.305, 0.738, 0.575, 0.84 , 3.31 , 0.5  , 0.765, 0.659,\n",
       "       0.45 , 0.58 , 0.535, 1.45 , 0.57 , 2.999, 0.415, 0.699, 0.435,\n",
       "       0.288, 0.32 , 2.2  , 1.336, 0.31 , 0.31 , 0.718, 0.329, 0.628,\n",
       "       0.5  , 0.608, 1.25 , 0.535, 0.63 , 1.728, 0.57 , 0.84 , 1.765,\n",
       "       0.58 , 0.925, 0.6  , 0.56 , 0.32 , 0.28 , 0.42 , 2.75 , 1.88 ,\n",
       "       0.37 , 0.28 , 1.59 , 0.12 , 2.15 , 1.25 , 0.375, 0.73 , 1.1  ,\n",
       "       2.18 , 0.53 , 0.438, 0.278, 0.675, 0.836, 0.42 , 2.05 , 0.28 ,\n",
       "       0.399, 0.755, 1.9  , 0.418, 0.505, 1.068, 0.385, 0.84 , 1.45 ,\n",
       "       0.34 , 0.299, 0.53 , 1.62 , 0.44 , 0.51 , 1.55 , 1.338, 0.748,\n",
       "       0.85 , 2.05 , 0.478, 0.26 , 0.83 , 1.07 , 0.259, 2.95 , 0.274,\n",
       "       0.638, 1.598, 0.505, 1.299, 0.419, 1.25 , 1.53 , 1.038, 1.53 ,\n",
       "       0.735, 0.488, 0.283, 0.85 , 0.42 , 1.64 , 0.355, 6.68 , 1.05 ,\n",
       "       1.6  , 1.08 , 0.635, 0.31 ])"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ytrain"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "1c8da9b8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>评估项目</th>\n",
       "      <th>优化前</th>\n",
       "      <th>多线性优化后</th>\n",
       "      <th>归一化后</th>\n",
       "      <th>先归一后多线优化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>MSE_train</td>\n",
       "      <td>0.064583</td>\n",
       "      <td>0.010753</td>\n",
       "      <td>0.064583</td>\n",
       "      <td>0.010753</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>MSE_test</td>\n",
       "      <td>0.044681</td>\n",
       "      <td>0.016343</td>\n",
       "      <td>0.108287</td>\n",
       "      <td>0.070631</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>MSE_cvs</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>MAE</td>\n",
       "      <td>0.180567</td>\n",
       "      <td>0.073262</td>\n",
       "      <td>0.180567</td>\n",
       "      <td>0.073262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>MAE_cvs</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>r2_train</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>r2_test</td>\n",
       "      <td>0.839806</td>\n",
       "      <td>0.941406</td>\n",
       "      <td>0.611759</td>\n",
       "      <td>0.746766</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Score_train</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Score_test</td>\n",
       "      <td>0.839806</td>\n",
       "      <td>0.941406</td>\n",
       "      <td>0.611759</td>\n",
       "      <td>0.746766</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          评估项目       优化前    多线性优化后      归一化后  先归一后多线优化\n",
       "0    MSE_train  0.064583  0.010753  0.064583  0.010753\n",
       "1     MSE_test  0.044681  0.016343  0.108287  0.070631\n",
       "2      MSE_cvs -0.073624 -0.073624 -0.073624 -0.073624\n",
       "3          MAE  0.180567  0.073262  0.180567  0.073262\n",
       "4      MAE_cvs -0.186796 -0.186796 -0.186796 -0.186796\n",
       "5     r2_train  0.887783  0.981317  0.887783  0.981317\n",
       "6      r2_test  0.839806  0.941406  0.611759  0.746766\n",
       "7  Score_train  0.887783  0.981317  0.887783  0.981317\n",
       "8   Score_test  0.839806  0.941406  0.611759  0.746766"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 先归一化后多线性\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "std = StandardScaler()\n",
    "X_train_std = std.fit_transform(Xtrain)\n",
    "X_test_std = std.fit_transform(Xtest)\n",
    "\n",
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "poly = PolynomialFeatures(degree=2).fit(X_train_std,ytrain)\n",
    "X_train = poly.transform(X_train_std)\n",
    "X_test = poly.transform(X_test_std)\n",
    "\n",
    "lr4 = LinearRegression().fit(X_train,ytrain)\n",
    "\n",
    "y_test_pred=lr4.predict(X_test)\n",
    "\n",
    "# MSE均方误差评估\n",
    "from sklearn.metrics import mean_squared_error\n",
    "y_pred = lr4.predict(X_train)\n",
    "MSE_train_4=mean_squared_error(ytrain,y_pred)\n",
    "\n",
    "y_test_pred=lr4.predict(X_test)\n",
    "MSE_test_4=mean_squared_error(ytest,y_test_pred)\n",
    "\n",
    "#交叉验证-MSE\n",
    "from sklearn.model_selection import cross_val_score\n",
    "lr2 = LinearRegression()\n",
    "MSE_cvs_4=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_squared_error').mean()\n",
    "\n",
    "# 交叉验证-MAE\n",
    "from sklearn.metrics import mean_absolute_error\n",
    "MAE_4=mean_absolute_error(ytrain,y_pred)\n",
    "\n",
    "MAE_cvs_4=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_absolute_error').mean()\n",
    "\n",
    "#交叉验证-方差\n",
    "from sklearn.metrics import r2_score\n",
    "r2_train_4=r2_score(ytrain,y_pred)\n",
    "\n",
    "r2_test_4=r2_score(ytest,y_test_pred)\n",
    "\n",
    "Score_train_4=lr4.score(X_train,ytrain)\n",
    "\n",
    "Score_test_4=lr4.score(X_test,ytest)\n",
    "\n",
    "import pandas as pd\n",
    "output = pd.DataFrame({'评估项目':['MSE_train','MSE_test','MSE_cvs','MAE','MAE_cvs','r2_train','r2_test','Score_train','Score_test'],\n",
    "                       '优化前':[MSE_train_1,MSE_test_1,MSE_cvs_1,MAE_1,MAE_cvs_1,r2_train_1,r2_test_1,Score_train_1,Score_test_1],\n",
    "                       '多线性优化后':[MSE_train_2,MSE_test_2,MSE_cvs_2,MAE_2,MAE_cvs_2,r2_train_2,r2_test_2,Score_train_2,Score_test_2],\n",
    "                       '归一化后':[MSE_train_3,MSE_test_3,MSE_cvs_3,MAE_3,MAE_cvs_3,r2_train_3,r2_test_3,Score_train_3,Score_test_3],\n",
    "                       '先归一后多线优化':[MSE_train_4,MSE_test_4,MSE_cvs_4,MAE_4,MAE_cvs_4,r2_train_4,r2_test_4,Score_train_4,Score_test_4]\n",
    "                      })\n",
    "output"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "3889a428",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>评估项目</th>\n",
       "      <th>优化前</th>\n",
       "      <th>多线性优化后</th>\n",
       "      <th>归一化后</th>\n",
       "      <th>先归一后多线优化</th>\n",
       "      <th>先多线后归一优化</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>MSE_train</td>\n",
       "      <td>0.064583</td>\n",
       "      <td>0.010753</td>\n",
       "      <td>0.064583</td>\n",
       "      <td>0.010753</td>\n",
       "      <td>0.010753</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>MSE_test</td>\n",
       "      <td>0.044681</td>\n",
       "      <td>0.016343</td>\n",
       "      <td>0.108287</td>\n",
       "      <td>0.070631</td>\n",
       "      <td>0.097240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>MSE_cvs</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "      <td>-0.073624</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>MAE</td>\n",
       "      <td>0.180567</td>\n",
       "      <td>0.073262</td>\n",
       "      <td>0.180567</td>\n",
       "      <td>0.073262</td>\n",
       "      <td>0.073262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>MAE_cvs</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "      <td>-0.186796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>r2_train</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "      <td>0.981317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>r2_test</td>\n",
       "      <td>0.839806</td>\n",
       "      <td>0.941406</td>\n",
       "      <td>0.611759</td>\n",
       "      <td>0.746766</td>\n",
       "      <td>0.651367</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Score_train</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "      <td>0.887783</td>\n",
       "      <td>0.981317</td>\n",
       "      <td>0.981317</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Score_test</td>\n",
       "      <td>0.839806</td>\n",
       "      <td>0.941406</td>\n",
       "      <td>0.611759</td>\n",
       "      <td>0.746766</td>\n",
       "      <td>0.651367</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          评估项目       优化前    多线性优化后      归一化后  先归一后多线优化  先多线后归一优化\n",
       "0    MSE_train  0.064583  0.010753  0.064583  0.010753  0.010753\n",
       "1     MSE_test  0.044681  0.016343  0.108287  0.070631  0.097240\n",
       "2      MSE_cvs -0.073624 -0.073624 -0.073624 -0.073624 -0.073624\n",
       "3          MAE  0.180567  0.073262  0.180567  0.073262  0.073262\n",
       "4      MAE_cvs -0.186796 -0.186796 -0.186796 -0.186796 -0.186796\n",
       "5     r2_train  0.887783  0.981317  0.887783  0.981317  0.981317\n",
       "6      r2_test  0.839806  0.941406  0.611759  0.746766  0.651367\n",
       "7  Score_train  0.887783  0.981317  0.887783  0.981317  0.981317\n",
       "8   Score_test  0.839806  0.941406  0.611759  0.746766  0.651367"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 先多线性后归一化\n",
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "poly = PolynomialFeatures(degree=2).fit(Xtrain,ytrain)\n",
    "X_train = poly.transform(Xtrain)\n",
    "X_test = poly.transform(Xtest)\n",
    "\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "std = StandardScaler()\n",
    "X_train = std.fit_transform(X_train)\n",
    "X_test = std.fit_transform(X_test)\n",
    "\n",
    "lr5 = LinearRegression().fit(X_train,ytrain)\n",
    "\n",
    "y_test_pred=lr4.predict(X_test)\n",
    "\n",
    "# MSE均方误差评估\n",
    "from sklearn.metrics import mean_squared_error\n",
    "y_pred = lr5.predict(X_train)\n",
    "MSE_train_5=mean_squared_error(ytrain,y_pred)\n",
    "\n",
    "y_test_pred=lr5.predict(X_test)\n",
    "MSE_test_5=mean_squared_error(ytest,y_test_pred)\n",
    "\n",
    "#交叉验证-MSE\n",
    "from sklearn.model_selection import cross_val_score\n",
    "lr2 = LinearRegression()\n",
    "MSE_cvs_5=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_squared_error').mean()\n",
    "\n",
    "# 交叉验证-MAE\n",
    "from sklearn.metrics import mean_absolute_error\n",
    "MAE_5=mean_absolute_error(ytrain,y_pred)\n",
    "\n",
    "MAE_cvs_5=cross_val_score(lr2,Xtrain,ytrain,cv=10,scoring='neg_mean_absolute_error').mean()\n",
    "\n",
    "#交叉验证-方差\n",
    "from sklearn.metrics import r2_score\n",
    "r2_train_5=r2_score(ytrain,y_pred)\n",
    "\n",
    "r2_test_5=r2_score(ytest,y_test_pred)\n",
    "\n",
    "Score_train_5=lr5.score(X_train,ytrain)\n",
    "\n",
    "Score_test_5=lr5.score(X_test,ytest)\n",
    "\n",
    "import pandas as pd\n",
    "output = pd.DataFrame({'评估项目':['MSE_train','MSE_test','MSE_cvs','MAE','MAE_cvs','r2_train','r2_test','Score_train','Score_test'],\n",
    "                       '优化前':[MSE_train_1,MSE_test_1,MSE_cvs_1,MAE_1,MAE_cvs_1,r2_train_1,r2_test_1,Score_train_1,Score_test_1],\n",
    "                       '多线性优化后':[MSE_train_2,MSE_test_2,MSE_cvs_2,MAE_2,MAE_cvs_2,r2_train_2,r2_test_2,Score_train_2,Score_test_2],\n",
    "                       '归一化后':[MSE_train_3,MSE_test_3,MSE_cvs_3,MAE_3,MAE_cvs_3,r2_train_3,r2_test_3,Score_train_3,Score_test_3],\n",
    "                       '先归一后多线优化':[MSE_train_4,MSE_test_4,MSE_cvs_4,MAE_4,MAE_cvs_4,r2_train_4,r2_test_4,Score_train_4,Score_test_4],\n",
    "                       '先多线后归一优化':[MSE_train_5,MSE_test_5,MSE_cvs_5,MAE_5,MAE_cvs_5,r2_train_5,r2_test_5,Score_train_5,Score_test_5]\n",
    "                      })\n",
    "output"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "520f6f8d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>floor</th>\n",
       "      <th>size</th>\n",
       "      <th>year</th>\n",
       "      <th>line</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>126</th>\n",
       "      <td>9</td>\n",
       "      <td>180.88</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>3</td>\n",
       "      <td>79.53</td>\n",
       "      <td>68</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>302</th>\n",
       "      <td>18</td>\n",
       "      <td>96.20</td>\n",
       "      <td>33</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>322</th>\n",
       "      <td>18</td>\n",
       "      <td>69.76</td>\n",
       "      <td>28</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>351</th>\n",
       "      <td>6</td>\n",
       "      <td>76.25</td>\n",
       "      <td>26</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>146</th>\n",
       "      <td>28</td>\n",
       "      <td>124.52</td>\n",
       "      <td>26</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>18</td>\n",
       "      <td>148.47</td>\n",
       "      <td>22</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>101</th>\n",
       "      <td>31</td>\n",
       "      <td>109.35</td>\n",
       "      <td>20</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>273</th>\n",
       "      <td>18</td>\n",
       "      <td>69.11</td>\n",
       "      <td>34</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>228</th>\n",
       "      <td>6</td>\n",
       "      <td>34.67</td>\n",
       "      <td>37</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>256 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     floor    size  year  line\n",
       "126      9  180.88     1     6\n",
       "85       3   79.53    68     4\n",
       "302     18   96.20    33     6\n",
       "322     18   69.76    28     6\n",
       "351      6   76.25    26     5\n",
       "..     ...     ...   ...   ...\n",
       "146     28  124.52    26     6\n",
       "2       18  148.47    22     5\n",
       "101     31  109.35    20     7\n",
       "273     18   69.11    34     6\n",
       "228      6   34.67    37     6\n",
       "\n",
       "[256 rows x 4 columns]"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Xtrain"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "27efe7a1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('floor', 29.55530320266456),\n",
       " ('size', 11.834037129200102),\n",
       " ('year', 51.52709465694718),\n",
       " ('line', 541.3878899325375)]"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#训练结果\n",
    "list(zip(X.columns,lr1.coef_[1:]*1000))#恢复量纲，总价单位：万"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "1bdc8786",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>floor</td>\n",
       "      <td>0.029555</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>size</td>\n",
       "      <td>0.011834</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>year</td>\n",
       "      <td>0.051527</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>line</td>\n",
       "      <td>0.541388</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>floor^2</td>\n",
       "      <td>-0.000461</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>floor size</td>\n",
       "      <td>-0.000031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>floor year</td>\n",
       "      <td>-0.000261</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>floor line</td>\n",
       "      <td>-0.001705</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>size^2</td>\n",
       "      <td>-0.000012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>size year</td>\n",
       "      <td>-0.000474</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>size line</td>\n",
       "      <td>0.002234</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>year^2</td>\n",
       "      <td>0.000199</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>year line</td>\n",
       "      <td>-0.006301</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>line^2</td>\n",
       "      <td>-0.046479</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             0         1\n",
       "0            1       0.0\n",
       "1        floor  0.029555\n",
       "2         size  0.011834\n",
       "3         year  0.051527\n",
       "4         line  0.541388\n",
       "5      floor^2 -0.000461\n",
       "6   floor size -0.000031\n",
       "7   floor year -0.000261\n",
       "8   floor line -0.001705\n",
       "9       size^2 -0.000012\n",
       "10   size year -0.000474\n",
       "11   size line  0.002234\n",
       "12      year^2  0.000199\n",
       "13   year line -0.006301\n",
       "14      line^2 -0.046479"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "coeff = pd.DataFrame([poly.get_feature_names_out(X.columns),lr1.coef_.tolist()]).T\n",
    "coeff"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "e075190e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 制表\n",
    "res=[]\n",
    "res.append(pd.DataFrame([poly.get_feature_names_out(X.columns),lr1.coef_.tolist()]).T)\n",
    "pd.concat(res).to_excel('总价至优参数.xlsx')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "d3028631",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.47663616])"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pred=lr1.predict(X_s)\n",
    "pred"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "6a2334f6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[1.000e+00, 8.000e+00, 6.600e+01, 2.300e+01, 4.000e+00, 6.400e+01,\n",
       "        5.280e+02, 1.840e+02, 3.200e+01, 4.356e+03, 1.518e+03, 2.640e+02,\n",
       "        5.290e+02, 9.200e+01, 1.600e+01]])"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "62ac2fd3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-2.344538266190425"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lr1.intercept_ "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d66bd0a5",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
